package org.example.service.impl;

import org.example.mapper.PasswordMapper;
import org.example.pojo.Personal;
import org.example.service.PasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PasswordServiceImpl implements PasswordService{
    @Autowired
    private  PasswordMapper passwordMapper;
    @Override
    public Integer updatePassword(Personal personal){
        Integer i = passwordMapper.selectPassword(personal);
        if (i==1){
            passwordMapper.updatePassword(personal);
            return 1;
        }else {
            return 0;
        }
    }
}
